#pragma once
#include "UIBase.h"
#include "../tools/RichTextEx.h"
class TransactionUI : public UIBase
{
public:
	TransactionUI();
	~TransactionUI();
public:
	static cocos2d::Node* createNode();
	virtual bool init();
	CREATE_FUNC(TransactionUI);
	Node* m_selectedNode;
	int m_selectedTouchID;
	bool m_isMove;
	bool m_isClicked;
	bool m_bDownTrade;//按下交易
	Node* m_Container;
	Node* m_GoldPanel;
	Sprite* m_GoldColseBtn;
	Sprite* m_GoldOkBtn;
	ui::TextField* m_GoldInput;
	vector<Sprite*> m_controlList;
	vector<Sprite*> m_bagIconList;
	//目标
	ui::Text* m_UserNameText;
	Sprite* m_CloseBtn;
	Sprite* m_GoldBtn;
	Sprite* m_TradeBtn;
	ui::Text* m_GoldText;
public:
	bool TouchDown(Touch* touch);
	void TouchMove(Touch* touch);
	bool TouchUp(Touch* touch);

	void ClickItem(Ref *pSender);

	void Open();							//打开
	void Close();							//关闭
	void RefreshData();					//刷新背包界面数据
	void AddTradeItem(TClientItem* item);
	void SetMoneyText(int money);
	void SetNameText(string name);
	void SetTradeStatus(bool TradeStatus);
	bool GetTradeStatus();
	void ShowGoldPanel(bool bshow);
};

